package com.kexin.service;

import com.kexin.mappers.data2.VUserInfoMapper;
import com.kexin.pojo.VUserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
public class VUserInfoService {
    @Autowired
    private VUserInfoMapper vUserInfoMapper;
    public List<VUserInfo> getUser(String userId) {
        Example example = new Example(VUserInfo.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("userId",userId);
        return vUserInfoMapper.selectByExample(example);

    }

    public void insertUser(VUserInfo vUserInfo) {
        vUserInfoMapper.insert(vUserInfo);

    }
}
